package net.oschina.app.protocol;

import net.oschina.app.base.BaseProtocol;
import net.oschina.app.bean.GeneralNewsBean;

import retrofit2.Call;

/**
 * Created by wei03 on 2017/1/14.
 */
public class NewsInfosProtocol extends BaseProtocol<GeneralNewsBean>{

    private  String mShow = "";
    private  String mCatalog = "1";

    public NewsInfosProtocol(String type) {
        if ("hotspot".equals(type)) {
            mShow = "week";
            mCatalog = "4";
        }
    }
    @Override
    protected Call<GeneralNewsBean> getCall(String pageIndex) {
        return mApiService.getGeneralNewsBean(String.valueOf(mPageIndex),mCatalog,mPageSize+"",mShow);
    }
}
